#include "AntiMineralTracePlugin.h"
#include "Expand/PluginsManager.h"
#include "Managers/GameManager.h"
#include "GameSingleton.h"
#include "Log.h"
#include "SubsystemNewTerrain.h"
#include "SubsystemDisguiseBehavior.h"


namespace AntiMineralTrace
{
    AntiMineralTracePlugin::AntiMineralTracePlugin()
    {
        // Subsystem 在这里替换
        GameSingleton::gameManager->replaceSubsystem<SubsystemTerrain, SubsystemNewTerrain>();
        GameSingleton::gameManager->registerSubsystem<SubsystemDisguiseBehavior>();
    }

    const std::string &AntiMineralTracePlugin::getPluginName()
    {
        static const std::string pluginName = "反矿透 插件";
        return pluginName;
    }

    const std::string &AntiMineralTracePlugin::getIntroduce()
    {
        static const std::string introduce = "原版的反矿透插件，不能跟其它地形插件一起使用";
        return introduce;
    }

    uint32_t AntiMineralTracePlugin::getUseAuthLevel()
    {
        return 100;
    }

    AuthDisplayType AntiMineralTracePlugin::getDisplayType()
    {
        return AuthDisplayType::Authority;
    }

    void AntiMineralTracePlugin::processCmd(ChatObj &chatObj, std::vector<std::string> &cmdDataVec) {}

    void AntiMineralTracePlugin::load()
    {
        // Component 在这里替换
    }

} // namespace PocketSurvival

extern "C" void initialize()
{
    GameSingleton::pluginsManager->registerPlugin<AntiMineralTrace::AntiMineralTracePlugin>();
    Log::Info("成功加载 反矿透 插件");
}